﻿using WebApiFirst.Model.Req;
using WebApiFirst.Model.Res;

namespace WebApiFirst.IService;

public interface IStudentService
{
    /// <summary>
    /// 添加
    /// </summary>
    /// <param name="addReq"></param>
    /// <returns></returns>
    Task<int> Add(AddReq addReq);

    /// <summary>
    /// 修改
    /// </summary>
    /// <param name="updateReq"></param>
    /// <returns></returns>
    Task<bool> Update(int id,UpdateReq updateReq);

    /// <summary>
    /// 删除
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task<int> Delete(int id);

    /// <summary>
    /// 获取单个结果
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task<StudentRes?> GetStudent(int id);

    /// <summary>
    /// 获取列表
    /// </summary>
    /// <returns></returns>
    Task<List<StudentRes>> GetList();

    /// <summary>
    /// 客户端评估
    /// </summary>
    /// <returns></returns>
    Task<IEnumerable<StudentRes>> GetListClientApprove();

    /// <summary>
    /// 服务端评估
    /// </summary>
    /// <returns></returns>
    Task<IEnumerable<StudentRes>> GetListServerApprove();

    /// <summary>
    /// 循环遍历
    /// </summary>
    /// <returns></returns>
    Task ForeachStudents();
}
